Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install missing extensions for AVIF support #919

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mukeshpanchal27
Copy link
Contributor

The docker CLI docker container did not installed the required extensions for AVIF mime support so this PR added those missing items.

When i check the var_dump( Imagick::getVersion() ); then it shows 7.1.1-26 and var_dump( Imagick::queryFormats( '*' ) ); return empty array.

See Screenshot:
Screenshot 2024-09-10 at 10 30 17 AM

Copy link

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good.

@tianon
Copy link
Member

tianon commented Sep 11, 2024

Thank you! Is there an example of some core WordPress functionality that would be broken or fixed by this? I guess maybe uploading/generating thumbnails of an AVIF file?

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally on board -- just a few nits.

We'll also need to run ./apply-templates.sh to get passing CI (otherwise it won't test the correct thing). I'm happy to help with this (and all my other proposed changes) if you want/need me to.

Dockerfile.template Outdated Show resolved Hide resolved
Dockerfile.template Outdated Show resolved Hide resolved
Dockerfile.template Outdated Show resolved Hide resolved
Dockerfile.template Outdated Show resolved Hide resolved
@mukeshpanchal27
Copy link
Contributor Author

mukeshpanchal27 commented Sep 12, 2024

We'll also need to run ./apply-templates.sh to get passing CI (otherwise it won't test the correct thing). I'm happy to help with this (and all my other proposed changes) if you want/need me to.

@tianon I’m unable to run this command as it shows an error in my setup, or I may have missed a step during setup. If you commit those changes then that would be great help. Thanks!

@swissspidy
Copy link
Contributor

@mukeshpanchal27 Here you go: mukeshpanchal27#1

@swissspidy
Copy link
Contributor

I guess maybe uploading/generating thumbnails of an AVIF file?

Yes exactly 👍

@@ -47,7 +47,8 @@ RUN set -ex; \
$PHPIZE_DEPS \
freetype-dev \
icu-dev \
imagemagick-dev \
imagemagick-dev libheif-dev \
libavif-dev \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, from the CI failure it looks like we need to add libavif-dev to the APT list below also (for the Debian-based variants).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, rebased, squashed -- hopefully CI is green now 🤞

@tianon
Copy link
Member

tianon commented Sep 12, 2024

Nice, looks good, thank you!

@tianon tianon merged commit aab2a24 into docker-library:master Sep 12, 2024
14 checks passed
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Sep 12, 2024
Changes:

- docker-library/wordpress@aab2a24: Merge pull request docker-library/wordpress#919 from mukeshpanchal27/add/avif-support
- docker-library/wordpress@aa3c30f: Install missing packages for AVIF support
@mukeshpanchal27 mukeshpanchal27 deleted the add/avif-support branch September 13, 2024 03:44
@mukeshpanchal27
Copy link
Contributor Author

mukeshpanchal27 commented Sep 16, 2024

@tianon When will it be shipped? I’m still getting the same results when i run var_dump(Imagick::queryFormats("*"));

Screenshot 2024-09-16 at 9 14 12 AM

@tianon
Copy link
Member

tianon commented Sep 16, 2024

I'm not sure what's up there, but it seems to be working fine for me? 😅

$ docker run -it --rm --pull=always wordpress bash
latest: Pulling from library/wordpress
Digest: sha256:a46a4a00e427168b92df0c792d0ab766bd1d4f111aaaae45fd0173ece590b6f3
Status: Image is up to date for wordpress:latest
root@74598af666cf:/var/www/html# php -a
Interactive shell

php > var_dump(Imagick::queryFormats('*'));
array(237) {
  [0]=>
  string(3) "3FR"
  [1]=>
  string(3) "3G2"
  [2]=>
  string(3) "3GP"
  [3]=>
  string(3) "AAI"
  [4]=>
  string(2) "AI"
  [5]=>
  string(4) "APNG"
  [6]=>
  string(3) "ART"
  [7]=>
  string(3) "ARW"
  [8]=>
  string(3) "AVI"
  [9]=>
  string(4) "AVIF"
  [10]=>
  string(3) "AVS"
  [11]=>
  string(3) "BGR"
  [12]=>
  string(4) "BGRA"
  [13]=>
  string(4) "BGRO"
  [14]=>
  string(3) "BIE"
  [15]=>
  string(3) "BMP"
  [16]=>
  string(4) "BMP2"
  [17]=>
  string(4) "BMP3"
  [18]=>
  string(3) "BRF"
  [19]=>
  string(3) "CAL"
  [20]=>
  string(4) "CALS"
  [21]=>
  string(6) "CANVAS"
  [22]=>
  string(7) "CAPTION"
  [23]=>
  string(3) "CIN"
  [24]=>
  string(3) "CIP"
  [25]=>
  string(4) "CLIP"
  [26]=>
  string(4) "CMYK"
  [27]=>
  string(5) "CMYKA"
  [28]=>
  string(3) "CR2"
  [29]=>
  string(3) "CR3"
  [30]=>
  string(3) "CRW"
  [31]=>
  string(3) "CUR"
  [32]=>
  string(3) "CUT"
  [33]=>
  string(4) "DATA"
  [34]=>
  string(3) "DCM"
  [35]=>
  string(3) "DCR"
  [36]=>
  string(3) "DCX"
  [37]=>
  string(3) "DDS"
  [38]=>
  string(5) "DFONT"
  [39]=>
  string(3) "DNG"
  [40]=>
  string(3) "DPX"
  [41]=>
  string(4) "DXT1"
  [42]=>
  string(4) "DXT5"
  [43]=>
  string(4) "EPDF"
  [44]=>
  string(3) "EPI"
  [45]=>
  string(3) "EPS"
  [46]=>
  string(4) "EPS2"
  [47]=>
  string(4) "EPS3"
  [48]=>
  string(4) "EPSF"
  [49]=>
  string(4) "EPSI"
  [50]=>
  string(3) "EPT"
  [51]=>
  string(4) "EPT2"
  [52]=>
  string(4) "EPT3"
  [53]=>
  string(3) "ERF"
  [54]=>
  string(3) "FAX"
  [55]=>
  string(4) "FILE"
  [56]=>
  string(4) "FITS"
  [57]=>
  string(7) "FRACTAL"
  [58]=>
  string(3) "FTP"
  [59]=>
  string(3) "FTS"
  [60]=>
  string(2) "G3"
  [61]=>
  string(2) "G4"
  [62]=>
  string(3) "GIF"
  [63]=>
  string(5) "GIF87"
  [64]=>
  string(8) "GRADIENT"
  [65]=>
  string(4) "GRAY"
  [66]=>
  string(5) "GRAYA"
  [67]=>
  string(6) "GROUP4"
  [68]=>
  string(1) "H"
  [69]=>
  string(4) "HALD"
  [70]=>
  string(3) "HDR"
  [71]=>
  string(4) "HEIC"
  [72]=>
  string(9) "HISTOGRAM"
  [73]=>
  string(3) "HRZ"
  [74]=>
  string(3) "HTM"
  [75]=>
  string(4) "HTML"
  [76]=>
  string(4) "HTTP"
  [77]=>
  string(5) "HTTPS"
  [78]=>
  string(3) "ICB"
  [79]=>
  string(3) "ICO"
  [80]=>
  string(4) "ICON"
  [81]=>
  string(3) "IIQ"
  [82]=>
  string(4) "INFO"
  [83]=>
  string(6) "INLINE"
  [84]=>
  string(3) "IPL"
  [85]=>
  string(6) "ISOBRL"
  [86]=>
  string(7) "ISOBRL6"
  [87]=>
  string(3) "J2C"
  [88]=>
  string(3) "J2K"
  [89]=>
  string(3) "JBG"
  [90]=>
  string(4) "JBIG"
  [91]=>
  string(3) "JNG"
  [92]=>
  string(3) "JNX"
  [93]=>
  string(3) "JP2"
  [94]=>
  string(3) "JPC"
  [95]=>
  string(3) "JPE"
  [96]=>
  string(4) "JPEG"
  [97]=>
  string(3) "JPG"
  [98]=>
  string(3) "JPM"
  [99]=>
  string(3) "JPS"
  [100]=>
  string(3) "JPT"
  [101]=>
  string(4) "JSON"
  [102]=>
  string(3) "K25"
  [103]=>
  string(3) "KDC"
  [104]=>
  string(5) "LABEL"
  [105]=>
  string(3) "M2V"
  [106]=>
  string(3) "M4V"
  [107]=>
  string(3) "MAC"
  [108]=>
  string(6) "MAGICK"
  [109]=>
  string(3) "MAP"
  [110]=>
  string(4) "MASK"
  [111]=>
  string(3) "MAT"
  [112]=>
  string(5) "MATTE"
  [113]=>
  string(3) "MEF"
  [114]=>
  string(4) "MIFF"
  [115]=>
  string(3) "MKV"
  [116]=>
  string(3) "MNG"
  [117]=>
  string(4) "MONO"
  [118]=>
  string(3) "MOV"
  [119]=>
  string(3) "MP4"
  [120]=>
  string(3) "MPC"
  [121]=>
  string(3) "MPG"
  [122]=>
  string(3) "MRW"
  [123]=>
  string(3) "MSL"
  [124]=>
  string(3) "MTV"
  [125]=>
  string(3) "MVG"
  [126]=>
  string(3) "NEF"
  [127]=>
  string(3) "NRW"
  [128]=>
  string(4) "NULL"
  [129]=>
  string(3) "ORF"
  [130]=>
  string(3) "OTB"
  [131]=>
  string(3) "OTF"
  [132]=>
  string(3) "PAL"
  [133]=>
  string(4) "PALM"
  [134]=>
  string(3) "PAM"
  [135]=>
  string(7) "PATTERN"
  [136]=>
  string(3) "PBM"
  [137]=>
  string(3) "PCD"
  [138]=>
  string(4) "PCDS"
  [139]=>
  string(3) "PCL"
  [140]=>
  string(3) "PCT"
  [141]=>
  string(3) "PCX"
  [142]=>
  string(3) "PDB"
  [143]=>
  string(3) "PDF"
  [144]=>
  string(4) "PDFA"
  [145]=>
  string(3) "PEF"
  [146]=>
  string(3) "PES"
  [147]=>
  string(3) "PFA"
  [148]=>
  string(3) "PFB"
  [149]=>
  string(3) "PFM"
  [150]=>
  string(3) "PGM"
  [151]=>
  string(3) "PGX"
  [152]=>
  string(5) "PICON"
  [153]=>
  string(4) "PICT"
  [154]=>
  string(3) "PIX"
  [155]=>
  string(5) "PJPEG"
  [156]=>
  string(6) "PLASMA"
  [157]=>
  string(3) "PNG"
  [158]=>
  string(5) "PNG00"
  [159]=>
  string(5) "PNG24"
  [160]=>
  string(5) "PNG32"
  [161]=>
  string(5) "PNG48"
  [162]=>
  string(5) "PNG64"
  [163]=>
  string(4) "PNG8"
  [164]=>
  string(3) "PNM"
  [165]=>
  string(9) "POCKETMOD"
  [166]=>
  string(3) "PPM"
  [167]=>
  string(7) "PREVIEW"
  [168]=>
  string(2) "PS"
  [169]=>
  string(3) "PS2"
  [170]=>
  string(3) "PS3"
  [171]=>
  string(3) "PSB"
  [172]=>
  string(3) "PSD"
  [173]=>
  string(4) "PTIF"
  [174]=>
  string(3) "PWP"
  [175]=>
  string(15) "RADIAL-GRADIENT"
  [176]=>
  string(3) "RAF"
  [177]=>
  string(3) "RAS"
  [178]=>
  string(3) "RAW"
  [179]=>
  string(3) "RGB"
  [180]=>
  string(4) "RGBA"
  [181]=>
  string(4) "RGBO"
  [182]=>
  string(3) "RGF"
  [183]=>
  string(3) "RLA"
  [184]=>
  string(3) "RLE"
  [185]=>
  string(3) "RMF"
  [186]=>
  string(3) "RW2"
  [187]=>
  string(3) "SCR"
  [188]=>
  string(3) "SCT"
  [189]=>
  string(3) "SFW"
  [190]=>
  string(3) "SGI"
  [191]=>
  string(5) "SHTML"
  [192]=>
  string(3) "SIX"
  [193]=>
  string(5) "SIXEL"
  [194]=>
  string(12) "SPARSE-COLOR"
  [195]=>
  string(3) "SR2"
  [196]=>
  string(3) "SRF"
  [197]=>
  string(7) "STEGANO"
  [198]=>
  string(3) "SUN"
  [199]=>
  string(4) "TEXT"
  [200]=>
  string(3) "TGA"
  [201]=>
  string(9) "THUMBNAIL"
  [202]=>
  string(4) "TIFF"
  [203]=>
  string(6) "TIFF64"
  [204]=>
  string(4) "TILE"
  [205]=>
  string(3) "TIM"
  [206]=>
  string(3) "TTC"
  [207]=>
  string(3) "TTF"
  [208]=>
  string(3) "TXT"
  [209]=>
  string(4) "UBRL"
  [210]=>
  string(5) "UBRL6"
  [211]=>
  string(3) "UIL"
  [212]=>
  string(4) "UYVY"
  [213]=>
  string(3) "VDA"
  [214]=>
  string(5) "VICAR"
  [215]=>
  string(3) "VID"
  [216]=>
  string(5) "VIDEO"
  [217]=>
  string(4) "VIFF"
  [218]=>
  string(4) "VIPS"
  [219]=>
  string(3) "VST"
  [220]=>
  string(4) "WBMP"
  [221]=>
  string(4) "WEBM"
  [222]=>
  string(4) "WEBP"
  [223]=>
  string(3) "WMV"
  [224]=>
  string(3) "WPG"
  [225]=>
  string(1) "X"
  [226]=>
  string(3) "X3F"
  [227]=>
  string(3) "XBM"
  [228]=>
  string(2) "XC"
  [229]=>
  string(3) "XCF"
  [230]=>
  string(3) "XPM"
  [231]=>
  string(3) "XPS"
  [232]=>
  string(2) "XV"
  [233]=>
  string(3) "XWD"
  [234]=>
  string(5) "YCbCr"
  [235]=>
  string(6) "YCbCrA"
  [236]=>
  string(3) "YUV"
}

Do you have more information about how your 320ccea... images were built so I can try to reproduce?

@mukeshpanchal27
Copy link
Contributor Author

@tianon AVIF is now working for PHP 8.1 and later versions. Since this PR addresses only those versions, would you like me to open a separate PR to ensure compatibility for PHP 8.0 and PHP 7.x versions as well?

@tianon
Copy link
Member

tianon commented Sep 17, 2024

PHP 8.0 and PHP 7.x are EOL, so unfortunately are not and will not be updated further (for this or any other changes 😬)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants